package com.malie.myspringboot.jdk8;

import java.util.Arrays;
import java.util.List;

public class StreamDemo {

    public static void main(String[] args) {
        /**
         * 1,获取所有姓黄信息
         * 2，长度为三
         * 3，输出
         */
        List<String> list = Arrays.asList("慌兮兮", "黄小明", "小张");
        list.stream().filter(e -> e.startsWith("黄"))
                .filter(e -> e.length() == 3)
                .forEach(System.out::println);
    }
}
